#ifndef QRUNNINGCORE_H
#define QRUNNINGCORE_H

#include "runninglibglobal.h"

#include <QObject>
#include <QMap>
#include <QWidget>
#include <QMainWindow>
#include <QGraphicsView>
#include <QGraphicsScene>

namespace SHAREDLIB
{
    class QLanguageManager;
    class QUserManager;
    class QPageManager;
    class QMemeryManager;
}

class QXmlStreamReader;
namespace RUNNINGLIB
{

    class QRunningHost;

    class RUNNINGLIB_EXPORT QRunningWindow : public QMainWindow
    {
        Q_OBJECT
    public:
        explicit QRunningWindow(const QString &projectPath,QWidget *parent = 0);
        ~QRunningWindow();

        bool    run();
    public slots:
        void    stop();
    protected:
        bool    open(const QString &path);
        void    loadProject(QXmlStreamReader *r);
        void    clear();
        bool    load();
        void    closeEvent(QCloseEvent *);

    signals:
        void    runSignal();
        void    stopSignal();
    public slots:
    protected:
        SHAREDLIB::QLanguageManager     *m_languageManager;
        SHAREDLIB::QUserManager        *m_userManager;
        SHAREDLIB::QPageManager        *m_pageManager;
        SHAREDLIB::QMemeryManager*         m_memeryManager;
        QRunningHost                    *m_host;
        QString                         m_projectPath;

    };

}

#endif // QRUNNINGCORE_H
